/*
 * @Description:
 *
 * @Author: XiongYaoYuan<xiongyaoyuan>
 * @Date: 2023-05-31 10:48:39
 * @FilePath: /yuxiuproweb/src/api/app/category.js
 */
import request from "@/utils/request";

// 查询app-商品-分类;列表
export function listCategory(query) {
  return request({
    url: "/app/category/list",
    method: "get",
    params: query,
  });
}

// 查询app-商品-分类;详细
export function getCategory(productCategoryId) {
  return request({
    url: "/app/category/" + productCategoryId,
    method: "get",
  });
}

// 新增app-商品-分类;
export function addCategory(data) {
  return request({
    url: "/app/category",
    method: "post",
    data: data,
  });
}

// 修改app-商品-分类;
export function updateCategory(data) {
  return request({
    url: "/app/category",
    method: "put",
    data: data,
  });
}

// 删除app-商品-分类;
export function delCategory(productCategoryId) {
  return request({
    url: "/app/category/" + productCategoryId,
    method: "delete",
  });
}
